Skip to content

automate version update - #21

Open
aheev wants to merge 1 commit into
LadybugDB:mainfrom
aheev:fix-artifact-vers
Open

automate version update#21
aheev wants to merge 1 commit into
LadybugDB:mainfrom
aheev:fix-artifact-vers

Conversation

@aheev

@aheev aheev commented Jul 23, 2026

Copy link
Copy Markdown
Member

Version can be updated with  npm run version:bump <new-version> via scripts/bump-version.js

scripts/bump-version.js updates all 4 files in one command:

File How updated
package.json direct JSON write
src-tauri/Cargo.toml regex replace
package-lock.json npm install --package-lock-only
src-tauri/Cargo.lock cargo update --precise <version> bugscope

@aheev

aheev commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@adsharma could you PTAL?

@adsharma

Copy link
Copy Markdown
Contributor

Let's fix the arrow version problem first so CI is green.

As far as I can tell, brew install doesn't allow installing older versions of arrow. One strategy is to make a new release of ladybug which depends on the latest arrow version. Any other suggestions?

@aheev

aheev commented Jul 24, 2026

Copy link
Copy Markdown
Member Author

Let's fix the arrow version problem first so CI is green.

As far as I can tell, brew install doesn't allow installing older versions of arrow. One strategy is to make a new release of ladybug which depends on the latest arrow version. Any other suggestions?

Guess that's the only way. Others ask users to custom build install libarrow

@adsharma

Copy link
Copy Markdown
Contributor

icebug 13 is out. Please test if it fixes CI

@adsharma
adsharma force-pushed the fix-artifact-vers branch from 433fd73 to eaab39c Compare July 28, 2026 21:54
@aheev

aheev commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

Looks lke CI passed after your push

@adsharma

Copy link
Copy Markdown
Contributor

Two minor comments:

1. cargo update command in bump-version.js will likely fail silently

File: scripts/bump-version.js, line 53

  execSync(`cargo update --precise ${newVersion} --manifest-path src-tauri/Cargo.toml bugscope`, ...)

The cargo update CLI expects -p (or --package ) to specify which package to update. The correct syntax is:

  cargo update -p bugscope --precise 0.18.1 --manifest-path src-tauri/Cargo.toml

What's written — appending a bare bugscope at the end — doesn't match cargo's CLI grammar. This will almost certainly exit non-zero, be caught by the catch block, and fall through to the warning message. That means:

  • The Cargo.lock update path is dead code.
  • Every invocation will print "Warning: failed to update Cargo.lock — run cargo update in src-tauri/ manually" even though it might have been possible to succeed.

The fix:

  execSync(`cargo update -p bugscope --precise ${newVersion} --manifest-path src-tauri/Cargo.toml`, {
    cwd: root,
    stdio: "inherit",
  });

2. Loose version validation regex

File: scripts/bump-version.js, line 18

  if (!/^\d+\.\d+\.\d+/.test(newVersion)) {

This only checks that the string starts with X.Y.Z — it lacks a trailing $ anchor. Values like 1.2.3.4.5-alpha+build would pass validation when they shouldn't (the comment says "Expected semver (e.g. 1.2.3)"). If strict semver is the goal:

  if (!/^\d+\.\d+\.\d+$/.test(newVersion)) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants